package Deadlock;

public class Main {

	public static void main(String[] args) {

		Proceso1 p1 = new Proceso1();
		Proceso2 p2 = new Proceso2();

		long time_start, time_end;
		long time_dif = 0;
		time_start = System.currentTimeMillis();
		
		p1.start();
		p2.start();
		
		while(time_dif < 12000){
			time_end = System.currentTimeMillis();
			time_dif = time_end - time_start;
		}
		System.out.println("----- Deadlock -----");

		System.exit(0);
	}

}
